From 30bc0c224bac091fcf2759c8e8853e7237196090 Mon Sep 17 00:00:00 2001 From: justbur Date: Tue, 8 Dec 2015 20:24:23 -0500 Subject: [PATCH] Allow custom prefix-prefix Suggested in #90. Thanks @Amorymeltzer --- which-key.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index 059cceda9ae..8254b60eb15 100644 --- a/which-key.el +++ b/which-key.el @@ -98,7 +98,15 @@ of the which-key popup." (defcustom which-key-separator (if which-key-dont-use-unicode " : " " → ") - "Separator to use between key and description." + "Separator to use between key and description. Default is \" → +\", unless `which-key-dont-use-unicode' is non nil, in which case +the default is \" : \"." + :group 'which-key + :type 'string) + +(defcustom which-key-prefix-prefix "+" + "String to insert in front of prefix commands (i.e., commands +that represent a sub-map). Default is \"+\"." :group 'which-key :type 'string) @@ -1240,7 +1248,7 @@ ORIGINAL-DESCRIPTION is the description given by (let* ((desc description) (desc (if (string-match-p "^group:" desc) (substring desc 6) desc)) - (desc (if group (concat "+" desc) desc)) + (desc (if group (concat which-key-prefix-prefix desc) desc)) (desc (which-key--truncate-description desc))) (make-text-button desc nil 'face (cond (hl-face hl-face) -- 2.30.2